import { Router, Route, Link, BrowserRouter, Switch, useHistory } from 'react-router-dom'
import { React, useEffect, useState } from 'react';
import { Layout, Menu, Breadcrumb, Space, Statistic, Row, Col, Card } from 'antd';
import { Redirect } from 'react-router'
import SubjectOneTest from './subjectOneTest'
import { checkLogin } from '../../utils/loginUtils/loginMethod'
import { message, Button } from 'antd';
export default () => {
    const { Countdown } = Statistic;
    const [deadline, setDeadline] = useState(Date.now() + 1000 * 60 * 45);
    function onFinish() {
        console.log('finished!');
    }

    useEffect(() => {
        console.log(deadline)
    }, [deadline])

    return (
        <>
            <Space

                direction='vertical'
            >
                <Card
                    title='剩余时间'
                    style={{ width: 300 }}
                >
                    <Countdown
                        value={deadline}
                        onFinish={onFinish}
                        valueStyle={{ color: "red" }}
                        format='m分s秒'
                         /> 
                </Card>
                
                

            </Space>
        </>
    )
}